<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <jsp:include page="/inc/head.jsp"/>
    <title>用户管理</title>
</head>
<body>
<jsp:include page="/inc/top.jsp"/>
<div class="container">
    <jsp:include page="inc.jsp"/>
    <table class="table table-bordered table-striped table-hover">
        <thead>
        <tr>
            <td colspan="7">
                <form class="form-inline" action="" id="searchForm" method="get"
                      style="padding-bottom: 0px;margin: 0px">
                    <input type="hidden" value="1" name="pageIndex" id="pageIndex"/>
                    <div class="form-group">
                        <label>用户名:</label>
                        <input type="text" class="form-control" value="${searchObj.username}" name="username"
                               placeholder="输入用户名">
                    </div>
                    <div class="form-group">
                        <label>用户昵称:</label>
                        <input type="text" class="form-control" value="${searchObj.nickname}" name="nickname"
                               placeholder="输入用户昵称">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
            </td>
        </tr>
        <tr>
            <td>用户标识</td>
            <td>用户名称</td>
            <td>用户昵称</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${datas.data}" var="user">
            <tr>
                <td>${user.id}</td>
                <td>${user.username}</td>
                <td>${user.nickname}</td>
                <td>
                    <a href="javascript:confirmOp('<%=request.getContextPath()%>/admin/user/delete/${user.id}','删除用户对象不可逆，确定删除${dep.id}吗?')"
                       class="btn btn-danger">删除</a>
                    <a href="<%=request.getContextPath()%>/admin/user/update/${user.id}" class="btn btn-warning">更新</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
        <jsp:include page="/inc/pager.jsp"/>
    </table>
</div>
</body>
</html>
